function addURLParam(url,name,value){
  url+=(url.indexOf("?"))==-1?"?":"&";
  url+=encodeURIComponent(name)+"="+encodeURIComponent(value);
  return url;
}
